class StockSpanner(object):

    def __init__(self):
        self.stock_prices = []
        self.stock_panner = []

    def next(self, price):
        """
        :type price: int
        :rtype: int
        """
        current_panner = 1
        for i in range(0, len(self.stock_prices)):
            if self.stock_prices[i] <= price:
                current_panner = max(self.stock_panner[i] + 1, current_panner)

        self.stock_prices.append(price)
        self.stock_panner.append(current_panner)
        return current_panner
# Your StockSpanner object will be instantiated and called as such:
# obj = StockSpanner()
# param_1 = obj.next(price)
